﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Hi_Baidu.Packet
{
    /// <summary>
    ///     协议簇枚举类
    /// </summary>
    public class Protocol
    {
        /// <summary>
        ///     网络协议簇
        /// </summary>
        public enum NetworkProtocol
        {
            /// <summary>
            ///     基本协议
            /// </summary>
            Base,
            /// <summary>
            ///     聊天协议
            /// </summary>
            TALK_MESSAGE,
            /// <summary>
            ///     视频协议
            /// </summary>
            VIDEO,
            /// <summary>
            ///     语音协议
            /// </summary>
            VOICE,
            /// <summary>
            ///     文件传送协议
            /// </summary>
            TRANSFER_FILE
        }

        /// <summary>
        ///     网络聊天协议 [传入]
        /// </summary>
        public enum TALK_IN_NetworkCommand : int
        {
            /// <summary>
            ///     完整聊天信息 [不分包]
            /// </summary>
            TOTAL_TALK_MESSAGE,
            /// <summary>
            ///     分包聊天信息
            /// </summary>
            DETACH_TALK_MESSAGE,
            /// <summary>
            ///     回馈成功接收聊天信息请求包
            /// </summary>
            REPLY_SUCESSFUL_TALK_MESSAGE,
            /// <summary>
            ///      提取图片
            /// </summary>
            REQUEST_PICTURE,
            /// <summary>
            ///     分包图片信息
            /// </summary>
            DETACH_IMAGE,
            /// <summary>
            ///     窗口抖动
            /// </summary>
            WINDOW_SHADOW,
            /// <summary>
            ///     回馈窗口抖动
            /// </summary>
            ACK_WAINDOW_SHADOW,
            /// <summary>
            ///     打洞请求
            /// </summary>
            DIG_A_HOLE,
            /// <summary>
            ///     打洞请求转发
            /// </summary>
            REDIRECT_HOLE,
            /// <summary>
            ///     打洞测试
            /// </summary>
            TEST_HOLE,
            /// <summary>
            ///     回馈服务器的打洞
            /// </summary>
            ACK_HOLE,
            /// <summary>
            ///     服务器回馈的打洞申请结果
            /// </summary>
            SERVER_ACK_HOLE
        }

        /// <summary>
        ///     网络聊天协议 [传入]
        /// </summary>
        public enum TALK_OUT_NetworkCommand : int
        {
            /// <summary>
            ///     完整聊天信息 [不分包]
            /// </summary>
            TOTAL_TALK_MESSAGE,
            /// <summary>
            ///     分包聊天信息
            /// </summary>
            DETACH_TALK_MESSAGE,
            /// <summary>
            ///      聊天消息回馈
            /// </summary>
            SUCESS_TALK_MESSAGE,
            /// <summary>
            ///      提取图片
            /// </summary>
            REQUEST_PICTURE,
            /// <summary>
            ///     分包图片信息
            /// </summary>
            DETACH_IMAGE,
            /// <summary>
            ///     窗口抖动
            /// </summary>
            WINDOW_SHADOW,
            /// <summary>
            ///     回馈窗口抖动
            /// </summary>
            ACK_WAINDOW_SHADOW,
            /// <summary>
            ///     打洞请求
            /// </summary>
            DIG_A_HOLE,
            /// <summary>
            ///     打洞请求转发
            /// </summary>
            REDIRECT_HOLE,
            /// <summary>
            ///     打洞测试
            /// </summary>
            TEST_HOLE,
            /// <summary>
            ///     回馈服务器的打洞
            /// </summary>
            ACK_HOLE,
            /// <summary>
            ///     服务器回馈的打洞申请结果
            /// </summary>
            SERVER_ACK_HOLE
        }

        /// <summary>
        ///     发送文件基础命令 [输出] 
        /// </summary>
        public enum OUT_SendFile
        {
            /// <summary>
            ///     发送文件请求包
            /// </summary>
            REQUEST_SEND_FILE,
            /// <summary>
            ///     拒绝文件信息包
            /// </summary>
            PASS_SEND_FILE,
            /// <summary>
            ///     接收文件请求包
            /// </summary>
            ALLOW_SEND_FILE
        }

        /// <summary>
        ///     发送文件基础命令 [传入] 
        /// </summary>
        public enum IN_SendFile
        {
            /// <summary>
            ///     发送文件请求包
            /// </summary>
            REQUEST_SEND_FILE,
            /// <summary>
            ///     拒绝文件信息包
            /// </summary>
            PASS_SEND_FILE,
            /// <summary>
            ///     接收文件请求包
            /// </summary>
            ALLOW_SEND_FILE
        }

        /// <summary>
        ///     网络基础命令 [传入]
        /// </summary>
        public enum IN_NetworkCommand : int
        {
            /// <summary>
            ///     登陆回馈包
            /// </summary>
            REPLY_LOGIN_PACKAGE,          
            /// <summary>
            ///     回馈获取自身信息请求包
            /// </summary>
            REPLY_GETMYSELFINFO_PACKAGE,
            // <summary>
            ///     接收分组回馈包
            /// </summary>
            REPLY_GROUP_PACKAGE,
            // <summary>
            ///     接收指定分组下好友回馈包
            /// </summary>
            REPLY_FRIEND_BY_GROUPID_PACKAGE,
            /// <summary>
            ///     接收指定好友信息回馈包
            /// </summary>
            REPLY_GET_FRIENDINFO_PACKAGE,
            /// <summary>
            ///     回馈修改个性签名请求包
            /// </summary>
            REPLY_MODIFY_PROD_PACKAGE,
            /// <summary>
            ///     回馈更新用户挂起信息请求包
            /// </summary>
            REPLY_UPDATE_USERINFO,
            /// <summary>
            ///     强制用户下线包
            /// </summary>
            SET_USER_OFFLINE,
            /// <summary>
            ///     回馈更改用户在线状态请求包
            /// </summary>
            REPLY_CHANAGE_USER_ONLINE_STATE_PACKAGE,
            /// <summary>
            ///     回馈更新用户分组请求包
            /// </summary>
            REPLY_UPDATE_ITEM_PACKAGE,
            /// <summary>
            ///     回馈添加用户分组请求包
            /// </summary>
            REPLY_ADD_NEW_ITEM_PACKAGE,
            /// <summary>
            ///     回馈删除用户分组请求包
            /// </summary>
            REPLY_DELETE_ITEM_PACKAGE,
            /// <summary>
            ///     回馈获取要添加好友信息请求包 - 没有找到该好友
            /// </summary>
            REPLY_GET_POST_FRIEND_INFO_NOT_FIND_PACKAGE,
            /// <summary>
            ///     回馈获取要添加好友信息请求包
            /// </summary>
            REPLY_GET_POST_FRIEND_INFO,
            /// <summary>
            ///     申请好友请求的用户转发
            /// </summary>
            REDIRECT_ADD_FRIEND,
            /// <summary>
            ///     回馈添加好友结果已经收到
            /// </summary>
            REPLY_RETURN_POST_ADD_FRIEND_PACKAGE,
            /// <summary>
            ///     回馈的添加好友最终状态广播
            /// </summary>
            REPLY_BOARDCAST_ADD_FRIEND,
            /// <summary>
            ///     好友上线信息包
            /// </summary>
            BOARDCAST_USERONLINE_MESSAGE,
            /// <summary>
            ///     回馈删除好友信息包
            /// </summary>
            REPLY_DELETE_FRIEND_PACKAGE,
            /// <summary>
            ///     回馈用户心跳请求包
            /// </summary>
            REPLY_USER_HEART_BREATH_PACKAGE
        }

        /// <summary>
        ///     网络基础命令 [输出]
        /// </summary>
        public enum OUT_NetworkCommand : int
        {
            /// <summary>
            ///     登陆申请包
            /// </summary>
            LOGIN_PACKAGE,
            /// <summary>
            ///     获得自身信息包
            /// </summary>
            GET_MYSELF_INFO_PACKAGE,
            /// <summary>
            ///     获得分组信息包
            /// </summary>
            GET_GROUP_PACKAGE,
            /// <summary>
            ///     获得指定分组内的好友信息包
            /// </summary>
            GET_FRIND_BY_GROUP_PACKAGE,
            /// <summary>
            ///     获得指定好友详细信息包
            /// </summary>
            GET_FRIEND_INFO,
            /// <summary>
            ///     修改个性签名
            /// </summary>
            MODIFY_PROD_PACKAGE,
            /// <summary>
            ///     更新挂起的用户信息
            /// </summary>
            UPDATE_USER_CHANAGE,
            /// <summary>
            ///     更改用户登录状态
            /// </summary>
            CHANAGE_USER_ONLINE_STATE,
            /// <summary>
            ///     更新用户分组
            /// </summary>
            UPDATE_ITEM,
            /// <summary>
            ///     添加新的用户分组
            /// </summary>
            ADD_NEW_ITEM,
            /// <summary>
            ///     删除用户分组
            /// </summary>
            DELETE_ITEM,
            /// <summary>
            ///     得到要申请的好友的详细信息
            /// </summary>
            GET_POST_FRIEND_INFO_PACKAGE,
            /// <summary>
            ///     添加好友请求包
            /// </summary>
            ADD_FRIEND,
            /// <summary>
            ///     添加好友结果包
            /// </summary>
            POST_ADD_FRIEND_RESULT_PAKCAGE,
            /// <summary>
            ///     删除好友请求包
            /// </summary>
            DELETE_FRIEND_PACKAGE,
            /// <summary>
            ///     心跳包
            /// </summary>
            HEART_BREATH_PACKAGE
        }
    }
}
